package com.woniuxy.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.PageInfo;
import com.woniuxy.entity.Product;
import com.woniuxy.dto.PageDto;
import com.woniuxy.entity.CategoryOne;
import com.woniuxy.entity.CategoryTwo;
import com.woniuxy.entity.HeatBidding;
import com.woniuxy.entity.Product;

public interface ProductService {

	public List<HeatBidding> findHeatBidding();// 查询热卖商品

	public List<CategoryTwo> findCategory(int co_id);

	public PageDto<Product> findByCategory(int co_id, int pageNum);

	public PageDto<Product> findByCt_id(int co_id, int ct_id, int pageNum);

	public PageDto<Product> findByName(String name, int pageNum);

	public PageDto<Product> findByStatus(int audit_status, int pageNum);

	public PageDto<Product> findByStatusAndName(String name, int audit_status, int pageNum);

	public List<Product> findHeat();

	public List<Product> findHeat2();

	public PageDto<Product> findByLike(String name, int pageNum);

	public PageDto<Product> findByNewest(int co_id, int pageNum);

	public PageDto<Product> findByHotest(int co_id, int pageNum);

	public PageDto<Product> findByChargeNum(int co_id, int pageNum);

	public PageDto<Product> findByPriceUpAndDown(int co_id, boolean flag, int pageNum);

	public int updateHeat(int p_id);

	public Product findProductById(int p_id, int u_id);// 查询Productbyid

	public Boolean isCollected(int p_id, int u_id);// 查询是否收藏过该商品

	public boolean isSigned(int p_id, int u_id);// 查询是否预约过商品

	public PageDto<Product> goodesByUid(int uid, int page);

	public List<CategoryOne> findoneMenu();

	public List<CategoryTwo> findTwoMenu();

	public boolean addProduct(Product product);

	public PageInfo<Product> allProducts(int pageNum, int pageSize);

	public int batchUpdateProducts(@Param("audit_status") Integer audit_status, @Param("ids") int[] ids);

	public int batchDeleteProducts(@Param("ids") int[] ids);

}
